home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / aros / exec / addmemhandler.c < prev    next >
Text File  |  1996-09-12  |  1KB  |  63 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: addmemhandler.c,v 1.4 1996/08/13 13:55:56 digulla Exp $
  4.     $Log: addmemhandler.c,v $
  5.     Revision 1.4  1996/08/13 13:55:56  digulla
  6.     Replaced __AROS_LA by __AROS_LHA
  7.     Replaced some __AROS_LH*I by __AROS_LH*
  8.     Sorted and added includes
  9.  
  10.     Revision 1.3  1996/08/01 17:41:02  digulla
  11.     Added standard header for all files
  12.  
  13.     Desc:
  14.     Lang:
  15. */
  16. /*****************************************************************************
  17.  
  18.     NAME */
  19.     #include <exec/execbase.h>
  20.     #include <clib/exec_protos.h>
  21.  
  22. __AROS_LH1(void, AddMemHandler,
  23.  
  24. /*  SYNOPSIS */
  25.     __AROS_LHA(struct Interrupt *, memHandler, A1),
  26.  
  27. /*  LOCATION */
  28.     struct ExecBase *, SysBase, 129, Exec)
  29.  
  30. /*  FUNCTION
  31.     Add some function to be called if the system is low on memory.
  32.  
  33.     INPUTS
  34.     memHandler - An Interrupt structure to add to the low memory
  35.              handler list.
  36.  
  37.     RESULT
  38.  
  39.     NOTES
  40.  
  41.     EXAMPLE
  42.  
  43.     BUGS
  44.  
  45.     SEE ALSO
  46.  
  47.     INTERNALS
  48.  
  49.     HISTORY
  50.     8-10-95    created by m. fleischer
  51.  
  52. ******************************************************************************/
  53. {
  54.     __AROS_FUNC_INIT
  55.     /* Protect the low memory handler list */
  56.     Forbid();
  57.     /* Nothing spectacular: Just add the new node */
  58.     Enqueue((struct List *)&SysBase->ex_MemHandlers,&memHandler->is_Node);
  59.     Permit();
  60.     __AROS_FUNC_EXIT
  61. } /* AddMemHandler */
  62.  
  63.